package panda.syntax;

import panda.query.struct.Constant;
import panda.record.*;

public class ColumnDef extends CreateDefinition {
	public String column;
	public boolean notNull, autoIncrement;
	public FieldInfo dataType;
	public Constant defaultValue;
	
	public ColumnDef(String n, FieldInfo t) {
		column=n; dataType=t;
		notNull=false; 
		autoIncrement=false; 
		defaultValue=null;
	}
	
	public ColumnDef(String n, FieldInfo t, boolean IsNotNull, boolean AutoIncrement) {
		column=n; dataType=t;
		notNull=IsNotNull; 
		autoIncrement=AutoIncrement; 
		defaultValue=null;
	}
	
	public ColumnDef(String n, FieldInfo t, Constant value) {
		column=n; dataType=t;
		notNull=false; 
		autoIncrement=false; 
		defaultValue=value;
	}
	
	public ColumnDef(String n, FieldInfo t, boolean IsNotNull, boolean AutoIncrement, Constant value) {
		column=n; dataType=t;
		notNull=IsNotNull; 
		autoIncrement=AutoIncrement; 
		defaultValue=value;
	}
}
